/* 目录树样式 */
.tree-node {
    margin: 2px 0;
    user-select: none;
}

.tree-node-content {
    display: flex;
    align-items: center;
    padding: 2px 4px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.tree-node-content:hover {
    background-color: #f3f4f6;
}

.tree-toggle {
    display: inline-block;
    width: 16px;
    text-align: center;
    cursor: pointer;
    font-size: 12px;
    color: #6b7280;
    margin-right: 4px;
}

.tree-toggle:hover {
    color: #374151;
}

.tree-spacer {
    display: inline-block;
    width: 16px;
    margin-right: 4px;
}

.tree-icon {
    display: inline-block;
    margin-right: 6px;
    font-size: 14px;
}

.tree-name {
    flex: 1;
    font-size: 14px;
    color: #374151;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tree-name.indexed {
    color: #059669;
    font-weight: 500;
}

.tree-info {
    font-size: 12px;
    color: #6b7280;
    margin-left: 8px;
}

.tree-children {
    border-left: 1px solid #e5e7eb;
    margin-left: 8px;
}

/* 统计信息样式 */
.stats-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    border-bottom: 1px solid #f3f4f6;
}

.stats-item:last-child {
    border-bottom: none;
}

.stats-label {
    font-size: 14px;
    color: #6b7280;
}

.stats-value {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

/* 加载和消息样式 */
#loading {
    display: none;
    padding: 12px;
    background-color: #dbeafe;
    border: 1px solid #93c5fd;
    border-radius: 6px;
    color: #1e40af;
    text-align: center;
    margin: 16px 0;
}

#message {
    display: none;
    padding: 12px;
    border-radius: 6px;
    margin: 16px 0;
    text-align: center;
}

#message.success {
    background-color: #d1fae5;
    border: 1px solid #6ee7b7;
    color: #065f46;
}

#message.error {
    background-color: #fee2e2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .tree-node {
        margin-left: 0 !important;
    }
    
    .tree-node-content {
        padding: 4px 2px;
    }
    
    .tree-name {
        font-size: 13px;
    }
    
    .tree-info {
        font-size: 11px;
    }
}

/* 目录树容器滚动条样式 */
#directory-tree-container::-webkit-scrollbar {
    width: 8px;
}

#directory-tree-container::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

#directory-tree-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

#directory-tree-container::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* 文件类型特殊样式 */
.tree-name[data-extension=".go"] {
    color: #0ea5e9;
}

.tree-name[data-extension=".js"] {
    color: #eab308;
}

.tree-name[data-extension=".py"] {
    color: #22c55e;
}

.tree-name[data-extension=".md"] {
    color: #8b5cf6;
}

.tree-name[data-extension=".json"] {
    color: #f59e0b;
}

/* 动画效果 */
.tree-children {
    transition: all 0.3s ease;
}

.tree-toggle {
    transition: transform 0.2s ease;
}

.tree-node-content:active {
    transform: scale(0.98);
}